'use strict';
exports = module.exports = function($scope, $ajax) {
    var data = [
        {"name":"顾磊","aaa":"1977-10-09","ccc":"1","check":{set:0},"eee":"76","fff":"FWKKQ","desc":"Ghbdo towxfitpa icdobv yuaqrj jopemljwh."},
        {"name":"郑超","aaa":"2001-06-19","ccc":"2","check":{set:0},"eee":"78","fff":"OHCLM","desc":"Gxcctk lumlxuu drblpfjci jceic."},
        {"name":"夏刚","aaa":"2006-03-26","ccc":"814","check":{set:0},"eee":"25","fff":"VCHBL","desc":"Srbzetnmc krwdtngq xwkkqxluw."},
        {"name":"郑超","aaa":"2001-06-19","ccc":"814","check":{set:0},"eee":"78","fff":"OHCLM","desc":"Gxcctk lumlxuu drblpfjci jceic."},
        {"name":"夏刚","aaa":"2006-03-26","ccc":"814","check":{set:0},"eee":"25","fff":"VCHBL","desc":"Srbzetnmc krwdtngq xwkkqxluw."}
    ];
    //////////////////////////////////////////////////////////
    // 对数据源某个字段进行条件判断
    // 有关的对象关联起来同进退
    var one2therr = {};
    for (var i = 0; i < data.length; i++) { if( ! one2therr["obj"+data[i].ccc] )
        one2therr["obj"+data[i].ccc] = { set:!!data[i].check.set }
        data[i].check = one2therr["obj"+data[i].ccc];
    }
    $scope.data = data;
    $scope.one2therr = one2therr;
}